"""catering_takeout URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from shops.views import *

from rest_framework.routers import DefaultRouter

urlpatterns = [
    path('shops_register/',Shops_register.as_view()),   #添加，注册商家信息
    path('shops_login/',Shops_Login.as_view()),      #商家登录

    path('query_shops/',ShopsView_get.as_view()),     #获取所有商家信息,修改商家信息
    path('query_shops/<int:pk>/',Shop_get_id.as_view()),    #获取一个商家信息
    # path('destroy_shops/',ShopsViewSet.as_view()),        #注销商家信息

    path('query_kind/',KindView.as_view()),   #获取商家所有菜品种类 ,添加菜品种类
    # path('kind_put/<int:pk>/',Kind_put.as_view())     #商家修改菜品种类,删除菜品种类

    path('get_dishes_all/<int:pk>/',DishesView.as_view()),    #获取商家一个种类的所有菜品,
    path('get_kind_dishes_all/',Dishes_all.as_view()),  #获取这个商家的所有菜品,添加菜品
    path('get_dishes/<int:pk>/',Dishes_particulars.as_view()),    #获取商家一个菜品,修改菜品,删除菜品

    path('order/', Shops_order.as_view()), #获取商家下所有完成的订单

    path('qiniu/',Qiniu_Token.as_view()) # 七牛云
]


